

import logging
# 封装日志采集的方法
def log_set():
    logging.basicConfig(filename='log.txt', level=logging.DEBUG, filemode='w+', format='%(asctime)s -> %(levelname)s -> %(message)s')

import yagmail
def send_mail(filepath):
    mail = yagmail.SMTP(user='2539722579@qq.com', password='uncucoutvhxrdicg', host='smtp.qq.com')
    mail.send(to='2539722579@qq.com', subject='测试报告', contents='今日报告，请查收', attachments=filepath)



import yaml
def get_from_yaml_new(filepath):
    with open(filepath,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)

data = get_from_yaml_new('datas.yaml')
print(data)
